<template>
  <div>
    <el-card class="box-card" shadow="never">
      <div slot="header" class="clearfix">
        <span>消息管理</span>
        <el-button
          style="float: right; padding: 3px 0"
          type="text"
          @click="goAll('pubMessageIndex')"
        >查看全部</el-button>
      </div>
      <scrollTable :tabledate="tabledate" :tableHeaders="tableHeaders"></scrollTable>
    </el-card>
    <el-card class="box-card" shadow="never">
      <div slot="header" class="clearfix">
        <span>待办事件</span>
        <el-button style="float: right; padding: 3px 0" type="text">查看全部</el-button>
      </div>
      <scrollTable :tabledate="tabledate1" :tableHeaders="tableHeaders1"></scrollTable>
    </el-card>
    <el-card class="box-card" shadow="never">
      <div slot="header" class="clearfix">
        <span>常用功能</span>
        <el-button style="float: right; padding: 3px 0" type="text" @click="inCommonUse">常用功能维护</el-button>
      </div>
      <div class="dailyFunction">
        <div class="dailyFunction-msg" v-for="(itgem,index) in 10" :key="index">投诉建议处理</div>
      </div>
    </el-card>
    <el-dialog
      title="常用功能设置"
      :visible.sync="dialogVisible"
      width="80%"
      :before-close="handleClose"
      v-if="dialogVisible"
    >
      <div v-loading="loading">
        <restaurantDialog
          ref="restaurantDialog"
          :isCreate="isCreate"
          :categoryOptions="categoryOptions"
          :selectItem="selectItem"
          @getList="getList(1)"
          @close="handleClose"
        ></restaurantDialog>
      </div>
    </el-dialog>
  </div>
</template>
 
<script>
import restaurantDialog from "./com/restaurantDialog";
import scrollTable from "@/views/components/scroll-table/index.vue";
export default {
  components: {
    scrollTable,
    restaurantDialog
  },
  data() {
    return {
      selectItem: undefined,
      categoryOptions: [],
      dialogVisible: false,
      tableHeaders: [
        { label: "消息分类", prop: "xxfl" },
        { label: "消息标题", prop: "xxbt" },
        { label: "消息内容", prop: "xxnr" },
        { label: "消息发送时间", prop: "fssj" },
        { label: "状态", prop: "zt" }
      ],
      tableHeaders1: [
        { label: "发起人", prop: "fqr" },
        { label: "审批类型", prop: "splx" },
        { label: "审批标题", prop: "spbt" },
        { label: "审批内容", prop: "spnr" },
        { label: "审批发起时间", prop: "spsj" },
        { label: "审批状态", prop: "spzt" }
      ],
      tabledate: [
        {
          xxfl: "1分类",
          xxbt: "1标题",
          fssj: "2024年4月15日15:57:31",
          xxnr: "我爱你",
          zt: 1
        },
        {
          xxfl: "2分类",
          fssj: "2024年4月15日15:58:17",
          xxbt: "1标题",
          xxnr: "我爱你",
          zt: 1
        },
        {
          xxfl: "3分类",
          fssj: "2024年4月15日15:58:17",
          xxbt: "1标题",
          xxnr: "我爱你",
          zt: 1
        },
        {
          xxfl: "4分类",
          fssj: "2024年4月15日15:58:17",
          xxbt: "1标题",
          xxnr: "我爱你",
          zt: 1
        },
        {
          xxfl: "5分类",
          fssj: "2024年4月15日15:58:17",
          xxbt: "1标题",
          xxnr: "我爱你",
          zt: 1
        },
        {
          xxfl: "6分类",
          fssj: "2024年4月15日15:58:17",
          xxbt: "1标题",
          xxnr: "我爱你",
          zt: 1
        },
        {
          xxfl: "7分类",
          fssj: "2024年4月15日15:58:17",
          xxbt: "1标题",
          xxnr: "我爱你",
          zt: 1
        },
        {
          xxfl: "8分类",
          fssj: "2024年4月15日15:58:17",
          xxbt: "1标题",
          xxnr: "我爱你",
          zt: 1
        },
        {
          xxfl: "9分类",
          fssj: "2024年4月15日15:58:17",
          xxbt: "1标题",
          xxnr: "我爱你",
          zt: 1
        },
        {
          xxfl: "10分类",
          fssj: "2024年4月15日15:58:17",
          xxbt: "1标题",
          xxnr: "我爱你",
          zt: 1
        }
      ],

      tabledate1: [
        {
          fqr: "1张三",
          splx: "爱情审批",
          spbt: "我爱你",
          spnr: "我爱你你爱我",
          spsj: "2024年4月15日16:03:54",
          spzt: "1"
        },
        {
          fqr: "2张三",
          splx: "爱情审批",
          spbt: "我爱你",
          spnr: "我爱你你爱我",
          spsj: "2024年4月15日16:03:54",
          spzt: "1"
        },
        {
          fqr: "3张三",
          splx: "爱情审批",
          spbt: "我爱你",
          spnr: "我爱你你爱我",
          spsj: "2024年4月15日16:03:54",
          spzt: "1"
        },
        {
          fqr: "4张三",
          splx: "爱情审批",
          spbt: "我爱你",
          spnr: "我爱你你爱我",
          spsj: "2024年4月15日16:03:54",
          spzt: "1"
        },
        {
          fqr: "5张三",
          splx: "爱情审批",
          spbt: "我爱你",
          spnr: "我爱你你爱我",
          spsj: "2024年4月15日16:03:54",
          spzt: "1"
        }
      ]
    };
  },
  methods: {
    inCommonUse() {
      // this.selectItem = undefined;
      // this.isCreate = 0;
      this.dialogVisible = true;
    },
    handleClose() {
      this.dialogVisible = false;
    },
    // C:\Users\gk176\Desktop\德清\dq-logistics-park\src\.vue
    goAll(url) {
      // this.$router.push("@/views/basic/message/pubMessage/pubMessageIndex");
      this.$router.push({ name: url });
    }
  }
};
</script>
<style scoped lang="scss">
.dailyFunction {
  display: flex;
  flex-wrap: wrap;
  text-align: center;
  .dailyFunction-msg {
    width: 22%;
    height: 100px;
    margin: 10px;
    border-radius: 20px;
    background: #409eff;
    font-size: 28px;
    line-height: 100px;
    color: #fff;
    cursor: pointer;
  }
}
.text {
  font-size: 14px;
}

.item {
  margin-bottom: 18px;
}

.clearfix:before,
.clearfix:after {
  display: table;
  content: "";
}
.clearfix:after {
  clear: both;
}
</style>